package com.wan.data.resource.converter;

import cn.hutool.core.convert.Converter;
import com.alibaba.fastjson.JSONObject;

/**
 * @author wwh
 * @date 2022/7/6 10:28
 */
public class JsonConverter implements Converter<JSONObject> {
    @Override
    public JSONObject convert(Object value, JSONObject defaultValue) throws IllegalArgumentException {
        if(value == null){
            return null;
        }
        return JSONObject.parseObject(value.toString());
    }
}
